﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        创建服务-Extension
    </title>
    <meta name="description" content="">
    <meta name="author" content="">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <!-- #CSS Links -->
    <!-- Basic Styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.css">

    <!-- SmartAdmin Styles : Caution! DO NOT change the order -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production-plugins.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-skins.css">

    <!-- SmartAdmin RTL Support -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-rtl.css">

    <!-- Demo purpose only: goes with demo.js, you can delete this css when designing your own WebApp -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/demo.css">

    <!-- #FAVICONS -->
    <link rel="shortcut icon" href="img/favicon/favicon.ico" type="image/x-icon">
    <link rel="icon" href="img/favicon/favicon.ico" type="image/x-icon">

    <!-- #GOOGLE FONT -->
    <link rel="stylesheet" href="css/open-sans.css" type="text/css">

    <!-- #APP SCREEN / ICONS -->
    <link rel="apple-touch-icon" href="img/splash/sptouch-icon-iphone.png">
    <link rel="apple-touch-icon" sizes="76x76" href="img/splash/touch-icon-ipad.png">
    <link rel="apple-touch-icon" sizes="120x120" href="img/splash/touch-icon-iphone-retina.png">
    <link rel="apple-touch-icon" sizes="152x152" href="img/splash/touch-icon-ipad-retina.png">

    <!-- iOS web-app metas : hides Safari UI Components and Changes Status Bar Appearance -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!-- Startup image for web apps -->
    <link rel="apple-touch-startup-image" href="img/splash/ipad-landscape.png"
          media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
    <link rel="apple-touch-startup-image" href="img/splash/ipad-portrait.png"
          media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
    <link rel="apple-touch-startup-image" href="img/splash/iphone.png" media="screen and (max-device-width: 320px)">
    <link href="appcss/Common.css" rel="stylesheet" />

</head>
<body class="desktop-detected minified">

    <!-- #MAIN PANEL -->
    <div id="main" role="main">

        <!-- RIBBON -->
        <div id="ribbon">

            <span class="ribbon-button-alignment">
                <span class="btn btn-ribbon"><i class="fa fa-home"></i></span>
            </span>

            <!-- breadcrumb -->
            <ol class="breadcrumb">
                <li><a href="DataServiceManagement.html">数据服务管理</a></li>
                <li><a href="CreateDataServiceChoseType.html">创建服务-选择服务类型</a></li>
                <li>创建服务-Extension</li>
            </ol>
            <!-- end breadcrumb -->

        </div>
        <!-- END RIBBON -->
        <!-- MAIN CONTENT -->
        <div id="content">
            <div class="row hidden">
                <div class="col-xs-12 col-sm-7 col-md-7 col-lg-4">
                    <h1 class="page-title txt-color-blueDark">
                        <i class="fa fa-edit fa-fw "></i>
                        主页
                        <span>
                            >
                            创建服务-Extension
                        </span>
                    </h1>
                </div>

            </div>

            <!-- widget grid -->
            <section id="widget-grid" class="">

                <!-- row -->
                <div class="row">

                    <!-- NEW WIDGET START -->
                    <!-- NEW WIDGET START -->
                    <article class="col-sm-12 col-md-12 ">

                        <!-- Widget ID (each widget will need unique ID)-->
                        <div class="jarviswidget" id="wid-id-2" data-widget-colorbutton="false"
                             data-widget-editbutton="false">
                            <!-- widget options:
                                usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">

                                data-widget-colorbutton="false"
                                data-widget-editbutton="false"
                                data-widget-togglebutton="false"
                                data-widget-deletebutton="false"
                                data-widget-fullscreenbutton="false"
                                data-widget-custombutton="false"
                                data-widget-collapsed="true"
                                data-widget-sortable="false"

                            -->
                            <header>
                                <h2>
                                    创建服务-Extension
                                </h2>

                            </header>

                            <!-- widget div-->
                            <div>

                                <!-- widget edit box -->
                                <div class="jarviswidget-editbox">
                                    <!-- This area used as dropdown edit box -->

                                </div>
                                <!-- end widget edit box -->
                                <!-- widget content -->
                                <div class="widget-body no-padding">

                                    <!-- Success states for elements -->

                                    <form id="Add-Form" class="smart-form">

                                        <header>填写相关信息</header>
                                        <fieldset>
                                            <section>
                                                <label class="label">名称</label>
                                                <label class="input">
                                                    <input type="text" name="Name" class="required" id="Extension-Name" />
                                                </label>
                                            </section>
                                            <section>
                                                <label class="label">外部扩展服务程序集(<a href="javascript:AddAssembly();">部署</a>)</label>
                                                <label class="input">
                                                    <input type="text" name="Assembly" style="background-color: #e6e3e3; cursor: pointer;" class="required" readonly="readonly" onclick="ChoseAssembly()" id="Extension-AssemblyName" />
                                                </label>
                                            </section>
                                            <section>
                                                <label class="label">外部扩展服务类型</label>
                                                <label class="input">
                                                    <input type="text" style="background-color: #e6e3e3; cursor: pointer;" name="Type" id="Extension-TypeName" class="required" onclick="ChoseType()" readonly="readonly" />
                                                </label>
                                            </section>
                                            <section>
                                                <label class="label">备注</label>
                                                <label class="input">
                                                    <input type="text" name="Description" id="Extension-Description" />
                                                </label>
                                            </section>
                                            <section>
                                                <label class="label">
                                                    选择分类(<a data-target="#AddModel" data-toggle="modal"
                                                            href="javascript:void(0);">新增分类</a>)
                                                </label>
                                                <label class="select">
                                                    <select id="FolderId" name="FolderId"></select>
                                                </label>
                                            </section>

                                        </fieldset>
                                        <footer>
                                            <input type="hidden" value="ExtDS" name="sys:sno" />
                                            <input type="hidden" value="CreateDataService" name="sys:act" />
                                            <button type="submit" class="btn btn-primary">下一步</button>
                                            <button type="button" class="btn btn-default" onclick="window.history.back();">
                                                返回
                                            </button>
                                        </footer>
                                    </form>
                                    <div class="alert alert-info fade in">
                                        <strong>通过代码开发适配非标准的WebService服务或者其他复杂的数据源。</strong>
                                        <p> 具体步骤如下：</p>
                                        <ul style="list-style-type: decimal;">
                                            <li><a href="../sdk/ExtDSAdapter.rar" target="_blank">下载开发包</a></li>
                                            <li><a href="../sdk/ExtDSAdapter.doc" target="_blank">下载开发文档</a>，根据开发文档中的描述来开发。</li>
                                            <li><a href="../sdk/ExtDSAdapter_Demo.rar" target="_blank">下载Demo</a></li>
                                        </ul>
                                    </div>
                                    <!--/ Success states for elements -->

                                </div>
                                <!-- end widget content -->

                            </div>
                            <!-- end widget div -->

                        </div>
                        <!-- end widget -->

                    </article>
                    <!-- WIDGET END -->

                </div>

                <!-- end row -->

            </section>
        </div>
        <!-- END MAIN CONTENT -->
    </div>

    <!-- END #MAIN CONTENT -->
    <!--================================================== -->
    <!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)
    <script data-pace-options='{ "restartOnRequestAfter": true }' src="js/plugin/pace/pace.min.js"></script>-->
    <!-- #PLUGINS -->
    <!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->


    <script src="js/libs/jquery-2.1.1.min.js"></script>
    <script src="js/libs/jquery-ui-1.10.3.min.js"></script>
    <!-- BOOTSTRAP JS -->
    <script src="js/bootstrap/bootstrap.min.js"></script>

    <!-- IMPORTANT: APP CONFIG -->
    <script src="js/app.config.js"></script>


    <!-- CUSTOM NOTIFICATION -->
    <script src="js/notification/SmartNotification.min.js"></script>

    <!-- JARVIS WIDGETS -->
    <script src="js/smartwidgets/jarvis.widget.min.js"></script>


    <!-- SPARKLINES -->
    <script src="js/plugin/sparkline/jquery.sparkline.min.js"></script>

    <!-- JQUERY MASKED INPUT -->
    <script src="js/plugin/masked-input/jquery.maskedinput.min.js"></script>

    <script src="js/plugin/bootstrap-slider/bootstrap-slider.min.js"></script>
    <!-- MAIN APP JS FILE -->
    <script src="js/app.min.js"></script>
    <script src="appjs/Helper.js"></script>
    <script src="appjs/Common.js"></script>
    <script src="js/plugin/jquery-validate/jquery.validate.min.js"></script>
    <script src="js/plugin/jquery-validate/jquery.metadata.js"></script>
    <script src="js/plugin/jquery-validate/messages_cn.js"></script>

    <script src="js/plugin/jquery-upload/jquery-upload.js"></script>

    <script src="js/plugin/datatables/jquery.dataTables.min.js"></script>
    <script src="js/plugin/datatables/dataTables.colVis.min.js"></script>
    <script src="js/plugin/datatables/dataTables.tableTools.min.js"></script>
    <script src="js/plugin/datatables/dataTables.bootstrap.min.js"></script>
    <script src="js/plugin/datatable-responsive/datatables.responsive.min.js"></script>

    <script>
        var draw = 0;
        var draw1 = 0;
        var TypeTable;
        var AssemblyTable;
        var AssemblyId;
        var AssemblyName;
        var uploadAssemblyId;
        $(function () {
            document.getElementById("Add-Form").reset();
            $("#Add-Form button[type=submit]").removeAttr("disabled");
            $("#Add-Form button[type=submit]").html("下一步");
            $("#add-Folder button[type=submit]").removeAttr("disabled");
            $("#add-Folder button[type=submit]").html("提交");
            var updateDataServiceFolderTree = function () {
                $("#FolderId").html("");
                $("#FolderId1").html("  <option value=''>根目录<\/option>");
                var list = GetDataServiceFolderTree();
                $("#FolderId").append(list);
                $("#FolderId1").append(list);
            }
            updateDataServiceFolderTree();
            $("#add-Folder").validate({
                submitHandler: function () {
                    $.ajax({
                        url: apiUrl,
                        data: $("#add-Folder").serialize(),
                        type: "Post",
                        dataType: "json",
                        success: function (data) {
                            $("#add-Folder button[type=submit]").removeAttr("disabled");
                            $("#add-Folder button[type=submit]").html("提交");
                            if (data.IsSccuess) {
                                ShowGritter("新增成功");
                                updateDataServiceFolderTree();
                                document.getElementById("add-Folder").reset();
                                $('#AddModel').modal("hide");
                            } else {
                                if (IsLogined(data.ErrorCode)) {
                                    alert("失败（" + "错误代码：" + data.ErrorCode + "，错误信息：" + data.Message + ")");
                                }
                            }
                        },
                        beforeSend: function () {
                            //ShowGritter("提交中");
                            $("#add-Folder button[type=submit]").attr("disabled", "disabled");
                            $("#add-Folder button[type=submit]").html("提交中");
                        }
                    });

                }
            });
            $("#Add-Form").validate({
                submitHandler: function () {
                    $.ajax({
                        url: apiUrl,
                        data: $("#Add-Form").serialize(),
                        type: "Post",
                        dataType: "json",
                        success: function (data) {
                            $("#Add-Form button[type=submit]").removeAttr("disabled");
                            $("#Add-Form button[type=submit]").html("下一步");
                            if (data.IsSccuess) {
                                var action = "DataSourceDetails-Extension.html";
                                // alert("新增成功");
                                ShowGritter("新增成功", 2, action + "?" + "Id=" + data.Data.Id);
                                //window.location.href = action + "?" +  "Id=" + data.Data.Id;
                            } else {
                                if (IsLogined(data.ErrorCode)) {
                                    alert("失败（" + "错误代码：" + data.ErrorCode + "，错误信息：" + data.Message + ")");
                                }
                            }
                        },
                        beforeSend: function () {
                            ShowGritter("提交中");
                            $("#Add-Form button[type=submit]").attr("disabled", "disabled");
                            $("#Add-Form button[type=submit]").html("提交中");
                        }
                    });

                }
            });
            //给文件域赋值
            $("#Template").change(function () {
                var $this = $(this);
                $this.parent().next().val($this.val());
            });
            //ajax上传文件
            $("#upload-btn").click(function () {
                $("#Template").upload({
                    // 上传地址
                    action: apiUrl,
                    // 文件域名字
                    name: 'File',
                    // 其他表单数据
                    data: { 'sys:sno': "ExtDS", "sys:act": "Upload" },
                    // 上传完成后, 返回json, text
                    // dataType: 'json',
                    // 上传之后回调
                    onsuccess: function (data) {
                        if (data.IsSccuess) {
                            setCookie("Extension-PlugInCreateOne" + data.Data.Id, JSON.stringify(data.Data), 1);
                            ShowGritter("上传成功");
                            $("#PlugInCreateOne").modal("hide");
                            AddStep2(data.Data.Id);
                        } else {
                            if (IsLogined(data.ErrorCode)) {
                                alert("上传失败（" + "错误代码：" + data.ErrorCode + "，错误信息：" + data.Message + ")");
                            }
                        }
                    }, onerror: function () {
                        alert("系统异常，请稍后再试！");
                    }
                });
            });
        });
        var AddAssembly = function () {
            document.getElementById("PlugInCreateOne-Form").reset();
            $("#PlugInCreateOne").modal("show");
        }
        //新增步骤2 传入返回的id
        var AddStep2 = function (id) {
            document.getElementById("PlugInCreateTwo-Form").reset();
            if (id != "") {
                uploadAssemblyId = id;
                var resultstr = getCookie("Extension-PlugInCreateOne" + id);
                if (resultstr != "") {
                    var resultobj = JSON.parse(resultstr);
                    $("#AssemblyName").val(resultobj.Assembly);
                    $("#AssemblyId").val(resultobj.Id);
                    $("#AssemblyVersion").val(resultobj.Version);
                    AppadParameterData(resultobj.Types);
                    $("#PlugInCreateTwo").modal("show");
                }
            }
        }
        var PlugInCreateTwo = function () {

            try {
                var trlist = $("#Type-Table tbody tr");
                if (trlist.length > 0) {
                    var str = "";
                    for (var i = 0; i < trlist.length; i++) {
                        var tempjson = JSON.parse($(trlist[i]).attr("data"));
                        str += (tempjson.id + ",");
                        str += (tempjson.name + ",");
                        str += ($("#update-date-" + tempjson.id).val());
                        if (i != (trlist.length - 1)) {
                            str += ",";
                        }
                    }
                    $("#TypeSettings").val(str);
                    $.ajax({
                        url: apiUrl,
                        type: "Post",
                        dataType: "json",
                        data: $("#PlugInCreateTwo-Form").serialize(),
                        success: function (data) {
                            if (data.IsSccuess) {
                                setCookie("Extension-PlugInCreateOne" + uploadAssemblyId, "", -1);
                                $("#PlugInCreateTwo").modal("hide");
                                ShowGritter("保存成功");
                            } else {
                                if (IsLogined(data.ErrorCode)) {
                                    alert("失败（" + "错误代码：" + data.ErrorCode + "，错误信息：" + data.Message + ")");
                                }
                            }
                        },
                        beforeSend: function () {
                            ShowGritter("提交中");
                        }
                    });
                }
            } catch (e) {
                console.log(e);
            }
        }
        //组合参数数据  编辑时需调用此方法处理返回的数据
        //传入的参数类型为对象数组
        var AppadParameterData = function (data) {
            //var list = new Array();
            var trlist = "";
            for (var i = 0; i < data.length; i++) {
                var $this = data[i];
                //list.push({ name: $this.Name, id: $this.Id, type: $this.Type, description: $this.Description });
                trlist += AssembleParameterData({ name: $this.Name, id: $this.Id, description: $this.Description });
            }
            $("#Type-Table tbody").html(trlist);
        }
        //传入参数对象返回一行的表格数据
        var AssembleParameterData = function (data) {
            var tr = "<tr data='" + JSON.stringify(data) + "'><td>";
            tr += (data.name + "</td>");
            tr += ("<td><input type=\"text\"  id=\"update-date-" + data.id + "\"  /></td>");
            tr += "</tr>";
            return tr;
        }

        //初始化程序集数据
        var IntAssemblyList = function () {
            if (draw == 0) {
                AssemblyTable = $('#Assembly-Table').dataTable({
                    "autoWidth": true,
                    "oLanguage": dataTableConfig,
                    "bLengthChange": false,
                    ordering: false,
                    bProcessing: true,
                    bStateSave: true,
                    serverSide: true,
                    searching: false,
                    aLengthMenu: [25],
                    "ajax": {
                        url: apiUrl,
                        "dataSrc": function (json) {
                            if (json.IsSccuess) {
                                var newjson = new Array();
                                for (var i = 0; i < json.Data.Items.length; i++) {
                                    var editstr = "";
                                    editstr += "<a href=\"javascript:void(0);\" onclick=\"UpdateDateResult(this)\" data-Id=\"" + json.Data.Items[i].Id + "\" data-Name='" + json.Data.Items[i].Assembly;
                                    editstr += "'><i class=\"fa fa-hand-o-right\"></i>查看</a>";

                                    var deleteStr = "<a href=\"javascript:void(0);\" onclick=\"DeleteAssembly(this)\" data-Id=\"" + json.Data.Items[i].Id + "\" data-Name='" + json.Data.Items[i].Assembly;
                                    deleteStr += "'><i class=\"fa fa-hand-o-right\"></i>删除</a>";
                                    newjson.push({ "name": json.Data.Items[i].Assembly, "version": json.Data.Items[i].Version, "option": editstr + deleteStr });
                                }
                                return newjson;
                            } else {
                                if (IsLogined(json.ErrorCode)) {
                                    alert("失败（" + "错误代码：" + json.ErrorCode + "，错误信息：" + json.Message + ")");
                                }
                            }
                            return [];
                        },
                        "data": function (d) {
                            draw = d.draw;
                            return $.extend({}, { "sys:sno": "ExtDS" }, { "sys:act": "GetAssemblyList" }, { "draw": d.draw }, { "length": d.length }, { "Page": parseInt(d.start / d.length) }, { "Filter": $('#assembly-filter').val() });
                        }
                    },
                    columns: [
                        { data: 'name' },
                        { data: 'version' },
                        { data: 'option' }
                    ]
                });
            } else {
                AssemblyTable.fnDraw();
            }
        }//初始化类型的数据
        var IntTypeList = function () {
            if (draw1 == 0) {
                TypeTable = $('#Plugin-Table').dataTable({
                    "autoWidth": true,
                    "bLengthChange": false,
                    "oLanguage": dataTableConfig,
                    ordering: false,
                    bProcessing: true,
                    bStateSave: true,
                    serverSide: true,
                    searching: false,
                    aLengthMenu: [25],
                    "ajax": {
                        url: apiUrl,
                        "dataSrc": function (json) {
                            if (json.IsSccuess) {
                                var newjson = new Array();
                                for (var i = 0; i < json.Data.Items.length; i++) {
                                    var optionstr = "";
                                    optionstr += "<a href='javascript:void(0)' onclick='ClickType(this)' TypeName='" + json.Data.Items[i].Name + "'>" + "<i class=\"fa fa-hand-o-right\"></i>选择</a>";
                                    newjson.push({ "name": json.Data.Items[i].Name, "type": json.Data.Items[i].Description, option: optionstr });
                                }
                                return newjson;
                            } else {
                                if (IsLogined(json.ErrorCode)) {
                                    alert("失败（" + "错误代码：" + json.ErrorCode + "，错误信息：" + json.Message + ")");
                                }
                            }
                            return [];
                        },
                        "data": function (d) {
                            draw1 = d.draw;
                            return $.extend({}, { "sys:sno": "ExtDS" }, { "sys:act": "GetTypeList" }, { "AssemblyId": AssemblyId }, { "draw": d.draw }, { "length": d.length }, { "Page": parseInt(d.start / d.length) });
                        }
                    },
                    columns: [
                        { data: 'name' },
                        { data: 'type' },
                        { data: 'option' }
                    ]
                });
            } else {
                TypeTable.fnDraw();
            }
        }
        var UpdateDateResult = function (obj) {
            var dataid = $(obj).attr("data-Id").trim();
            AssemblyId = dataid;
            $("#Extension-AssemblyName").val($(obj).attr("data-Name"));
            AssemblyName = $(obj).attr("data-Name").trim();
            $("#AssemblyChose").modal("hide");
            ChoseType();
        }

        var DeleteAssembly = function (obj) {
            if (window.confirm("是否要删除:" + $(obj).attr("data-Name").trim())) {
                $.ajax({
                    url: apiUrl,
                    type: "Post",
                    dataType: "json",
                    data: "sys:sno=ExtDS&sys:act=DeleteAssembly&AssemblyId=" + $(obj).attr("data-Id").trim(),
                    success: function (data) {
                        if (data.IsSccuess) {
                            ShowGritter("删除成功");
                            IntAssemblyList();
                        } else {
                            if (IsLogined(data.ErrorCode)) {
                                alert("失败（" + "错误代码：" + data.ErrorCode + "，错误信息：" + data.Message + ")");
                            }
                        }
                    },
                    beforeSend: function () {
                        ShowGritter("提交中");
                    }
                });
            }
        }
        var ClickType = function (obj) {
            $("#Extension-TypeName").val($(obj).attr("TypeName"));
            $("#TypeChose").modal("hide");
        }
        var ChoseAssembly = function () {
            IntAssemblyList();
            $("#AssemblyChose").modal("show");
        }
        var ChoseType = function () {
            var assembly = $("#Extension-AssemblyName").val();
            if (assembly == "") {
                ChoseAssembly();
            } else {
                IntTypeList();
                $("#TypeChose").modal("show");
            }
        }
    </script>
    <div aria-hidden="true" aria-labelledby="remoteModalLabel" role="dialog" tabindex="-1" id="AddModel"
         class="modal fade" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                        ×
                    </button>
                    <h4 class="modal-title">添加数据服务目录</h4>
                </div>
                <div class="modal-body no-padding">

                    <form class="smart-form" id="add-Folder" action="">
                        <fieldset>
                            <section>
                                <label class="label">选择分类</label>
                                <label class="select">
                                    <select id="FolderId1" name="ParentId">
                                        <option value="">根目录</option>
                                    </select>
                                </label>
                            </section>
                            <section>
                                <label class="label">编码</label>
                                <label class="input">
                                    <input type="text" class="required" name="Code" id="add-Folder-Code" />
                                </label>
                            </section>
                            <section>
                                <label class="label">名称</label>
                                <label class="input">
                                    <input type="text" class="required" name="Caption" id="add-Folder-Caption" />
                                </label>
                            </section>

                        </fieldset>

                        <footer>
                            <input type="hidden" value="ETL" name="sys:sno" />
                            <input type="hidden" value="CreateDataServiceFolder" name="sys:act" />
                            <button class="btn btn-primary" type="submit">
                                提交
                            </button>
                            <button data-dismiss="modal" class="btn btn-default" type="button">
                                取消
                            </button>
                        </footer>

                    </form>
                </div>
            </div>
        </div>
    </div>
    <div aria-hidden="true" aria-labelledby="remoteModalLabel" role="dialog" tabindex="-1" id="AssemblyChose"
         class="modal fade" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                        ×
                    </button>
                    <h4 class="modal-title">选择Assembly</h4>
                </div>
                <div class="modal-body no-padding">

                    <form class="smart-form" id="AssemblyChose-Form" action="">
                        <fieldset>
                            <section>
                                <input id="assembly-filter" />
                                <button onclick="IntAssemblyList()" type="button">查询</button>
                                <table class="table table-bordered  table-hover smart-form" id="Assembly-Table">
                                    <thead>
                                        <tr>
                                            <th>名称</th>
                                            <th>版本</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>Row 4</td>
                                            <td>描述</td>
                                            <td>描述</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </section>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div aria-hidden="true" aria-labelledby="remoteModalLabel" role="dialog" tabindex="-1" id="TypeChose"
         class="modal fade" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                        ×
                    </button>
                    <h4 class="modal-title">选择Type</h4>
                </div>
                <div class="modal-body no-padding">

                    <form class="smart-form" id="TypeChose-Form" action="">
                        <fieldset>
                            <section>
                                <label class="label">Types</label>
                                <table class="table table-bordered  table-hover smart-form" id="Plugin-Table">
                                    <thead>
                                        <tr>
                                            <th>名称</th>
                                            <th>描述</th>
                                            <th>选择类</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td colspan="3">选择程序集后查看</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </section>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div aria-hidden="true" aria-labelledby="remoteModalLabel" role="dialog" tabindex="-1" id="PlugInCreateOne"
         class="modal fade" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                        ×
                    </button>
                    <h4 class="modal-title">Step1</h4>
                </div>
                <div class="modal-body no-padding">

                    <form action="" class="smart-form" id="PlugInCreateOne-Form">
                        <fieldset>
                            <section>
                                <label class="label">程序集</label>
                                <label class="input input-file" for="Template">
                                    <div class="button">
                                        <input type="file" name="Template" accept=".dll" id="Template">
                                        浏览
                                    </div>
                                    <input type="text" readonly="" placeholder="选择文件" name="TemplateText" class="required">
                                </label>
                            </section>

                        </fieldset>
                        <footer>
                            <button type="button" id="upload-btn" class="btn btn-primary">下一步</button>
                        </footer>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div aria-hidden="true" aria-labelledby="remoteModalLabel" role="dialog" tabindex="-1" id="PlugInCreateTwo"
         class="modal fade" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                        ×
                    </button>
                    <h4 class="modal-title">Step2</h4>
                </div>
                <div class="modal-body no-padding">

                    <form action="" class="smart-form" id="PlugInCreateTwo-Form">
                        <header>选择文件</header>
                        <fieldset>

                            <section>
                                <label class="label">程序集</label>
                                <label class="input">
                                    <input type="text" readonly="readonly" id="AssemblyName" name="AssemblyName">
                                </label>
                            </section>
                            <section>
                                <label class="label">版本</label>
                                <label class="input">
                                    <input type="text" readonly="readonly" id="AssemblyVersion" name="AssemblyVersion">
                                </label>
                            </section>
                            <section>
                                <label class="label">插件</label>
                                <table class="table table-bordered table-striped" id="Type-Table" style="width: 40%;">
                                    <thead>
                                        <tr>
                                            <th>Class</th>
                                            <th>Description</th>
                                        </tr>
                                    </thead>
                                    <tbody></tbody>
                                </table>

                            </section>
                        </fieldset>
                        <footer>
                            <input type="hidden" value="ExtDS" name="sys:sno" />
                            <input type="hidden" value="Publish" name="sys:act" />
                            <input type="hidden" id="AssemblyId" name="AssemblyId" value="" />
                            <input type="hidden" id="TypeSettings" name="TypeSettings" value="" />
                            <button type="button" class="btn btn-primary" onclick="PlugInCreateTwo()">提交</button>
                        </footer>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
